package com.lixueju.security.box.validate.code;

import org.springframework.web.context.request.ServletWebRequest;

/**
 *  校验码处理器接口，其实现类可实现不同校验码的处理逻辑
 *
 * @author lixueju
 * @since 2019/10/4 10:57
 **/
public interface ValidateCodeProcessor {
    /**
     * 创建校验码
     *
     * @param request
     * @throws Exception
     */
    void create(ServletWebRequest request) throws Exception;

    /**
     * 校验验证码
     *
     * @param servletWebRequest
     * @throws Exception
     */
    void validate(ServletWebRequest servletWebRequest);
}
